How to delete Windows 95 System Files from the Command Prompt.





Boot to the command prompt and delete all Windows 95 system files, run ScanDisk, boot from a DOS system diskette, and reinstall the DOS system files.

Do the following to uninstall Windows 95 from the command line:

    1) Make sure a bootable DOS diskette that contains the SYS.COM file is available.
    CAUTION: Do not continue this procedure if a bootable diskette is NOT available.
    2) Turn on the computer.
    3) Wait for the 'Starting Windows 95' message to appear.
    4) Press F8 IMMEDIATELY.
    5) Select 'Command prompt only'.
    6) Enter the following commands at the command prompt:
    COPY \WINDOWS\COMMAND\DELTREE.EXE C:
    COPY \WINDOWS\COMMAND\SCANDISK.* C:
    7) Do the following to configure ScanDisk to remove invalid (for a previous DOS version) filename characters and volume names:

      a) Enter the following command:
      EDIT SCANDISK.INI
      b) Find the line that looks like the following:
      labelcheck=off
      c) Edit the line to look like the following:
      labelcheck=on
      d) Find the line that looks like the following:
      spacecheck=off
      e) Edit the line to look like the following:
      spacecheck=on
      f) Save the changes to SCANDISK.INI and exit the editor.

    8) Enter the following command:
    SCANDISK C:
    (where C: is the drive that contains Windows 95).
    NOTE: Consult the ScanDisk Help if ScanDisk detects errors during it's file system check.
    9) Enter the following commands at the MS-DOS prompt:
    DELTREE < Windows 95 DIR >
    (where < Windows 95 DIR > is the directory that contains Windows 95 files).
    CAUTION: Before performing this step, make sure that no important files (that have not been backed up) are contained in the Windows 95 directory or any of its subdirectories. The DELTREE command deletes all files AND all subdirectories.
    10) Enter the following commands to delete the Windows 95 configuration files:
    DELTREE CONFIG.SYS
    DELTREE AUTOEXEC.BAT
    11) Enter the following command:
    DIR WINBOOT.*
    12) Do one of the following:

      a) DIR WINBOOT command reports no files found: Skip to step 13).
      b) DIR WINBOOT command shows one or more WINBOOT.* files: Enter the following command:
      DELTREE WINBOOT.*

    13) Enter the following commands to delete the Windows 95 log files:
    DELTREE SETUPLOG.*
    DELTREE BOOTLOG.*
    DELTREE DETLOG.*
    14) Do one of the following:

      a) Boot drive is compressed (for example, with DriveSpace or Stacker): Enter the following commands:
      H:
      DELTREE IO.SYS
      DELTREE MSDOS.SYS
      (where H: is the correct drive letter for the host drive of the compression software).
      b) No compression: Enter the following commands:
      DELTREE IO.SYS
      DELTREE MSDOS.SYS

    15) Do one of the following:

      a) Using Stacker version 3.1: Skip to step 16).
      b) Using other compression software: Enter the following command:
      DELTREE D??SPACE.BIN
      c) NOT using compression software: Skip to step 16).

    16) Enter the following command to delete the Windows 95 command processor:
    DELTREE COMMAND.COM
    17) Insert the bootable DOS diskette in the floppy drive.
    18) Press CTRL+ALT+DEL to restart the computer from the diskette.
    19) Enter the following command from the diskette to reinstall the DOS system files on the hard drive:
    SYS C:
    (where C: is the letter designation of the drive that contains Windows 95).
    20) (Optional) Start the DOS system with the previous configuration files: Enter the following commands:
    COPY C:\CONFIG.DOS C:\CONFIG.SYS
    COPY C:\AUTOEXEC.DOS C:\AUTOEXEC.BAT
    21) ONLY if using MS-DOS 6.0 and DoubleSpace disk compression: Enter the following command at the MS-DOS prompt:
    COPY C:\DOS\DBLSPACE.BIN C:
    22) ONLY if CONFIG.SYS contains a 'SHELL=' line that references COMMAND.COM in a different directory than the root directory: Enter the following command:
    COPY C:\DOS\COMMAND.COM C:
    (where C:\DOS should be the directory that contains the COMMAND.COM referenced in the CONFIG.SYS SHELL statement).





2nd Opinion copyright © 1997 by McAfee Associates.
Subject to the terms set forth in the end-user license agreement. All rights reserved.